#--- ВЛЮЧЕНИЕ ЖЕЛТОЙ СТРОКИ КОТОРАЯ ПОСЛЕ УСТАНОВКИ СВЕРХУ ВИСИТ --------------
#autogenerated = 1 # remove this line to remove the warning



#--- НАСТРОЙКА МОНИТОРОВ ------------------------------------------------------
#monitor=,preferred,auto,1
#monitor=DP-1, 1920x1080q, 0x0, 1
monitor=eDP-1, 1920x1080,0x1080,1
monitor=DP-3, 1920x1080, 0x0, 1, transform,0 #Монитор Через док станцию
monitor=DP-4, 1920x1080, 0x0, 1, transform,0 #Монитор Через док станцию
##monitor=HDMI-1, 1920x1080, 0x0, 1, transform,0 #Домашний монитор без док станции

#--- АВТОСТАРТ ----------------------------------------------------------------
exec-once = wireplumber
exec-once = pipewire-pulse
exec-once = pipewire
exec-once = nm-applet
exec-once = blueman
exec-once = blueman-applet
#exec-once = hypridle

exec-once = waybar -c /home/darkside/.config/waybar/config.jsonc -s .config/waybar/test.css
#exec-once = swaybg -i /home/darkside/.wallpapers/photo_2024-02-24_23-25-11.jpg & sleep 2

#exec-once = telegram-desktop
#exec-once = telegram-desktop -startintray
#exec-once = firefox
exec-once = ~/.azotebg-hyprland
#exec-once = /home/darkside/.config/hypr/scripts/screenoff.sh


#-- ПОДКЛЮЧЕНИЕ ДОПОЛНИТЕЛЬНЫХ ФАЙЛОВ С КОНФИГОМ  ----------------------------
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

#--- ПЕРЕМЕННЫЕ ---------------------------------------------------------------
$terminal = alacritty --config-file ~/.config/alacritty/alacritty.toml
$fileManager = nautilus


#--- КУРСОР -------------------------------------------------------------------
env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that

#--- РАСКЛАДКА КЛАВИАТУРЫ -----------------------------------------------------
input {
    kb_layout = us,ru
    kb_variant =
    kb_model =
    kb_options = grp:caps_toggle
    kb_rules =

#--- ЭТО ЧТО БЫ ФОКУС ЗА МЫШЬЮ СЛЕДОВАЛ ---------------------------------------
    follow_mouse = 1

#--- ТАЧПАД -------------------------------------------------------------------
    touchpad {
        natural_scroll = off
    }

#--- ЧУВСТВИТЕЛЬНОСТЬ МЫШИ ----------------------------------------------------
    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}


general {
#--- ГАПСЫ, БОРДЕРЫ, ЦВЕТА... -------------------------------------------------
    gaps_in = 5
    gaps_out = 10
    border_size = 1
    col.active_border = rgba(d3c6aaff)
#    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(1e2327fa)

#--- МАКЕТ РАСРОЛОЖЕНИЕ ОКОН (master что бы как в dwm) ------------------------
    layout = dwindle

#--- ОТКЛЮЧИТЬ БОРДЕР У ПЛАВАЮЩИХ ОКОН ----------------------------------------
no_border_on_floating = false

#--- ЧТО ТО С ТИРИНГОМ, ЯХЗ ---------------------------------------------------
    allow_tearing = false
}


#--- ДЕКОРАЦИИ ОКОН -----------------------------------------------------------
decoration {
    rounding = 5
    
    blur {
        enabled = true
        size = 3
        passes = 1
    }

    drop_shadow = yes
    shadow_range = 3
    shadow_render_power = 3
    col.shadow = rgba(1e2327ff)
}


#--- АНИМАЦИИ -----------------------------------------------------------------
animations {
    enabled = yes
    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}


#--- НАСТРОЙКА ЛАЙОУТОВ -------------------------------------------------------
dwindle {
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

#master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
#    new_is_master = true
#}


#--- ЖЕСТЫ --------------------------------------------------------------------
gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = on
}

#--- ВКЛЮЧИТЬ ДЕФОЛТНЫЕ ОБОИ --------------------------------------------------
misc {
    force_default_wallpaper = 1 # Set to 0 to disable the anime mascot wallpapers
}

#--- НАСТРОЙКА УСТРОЙСТВ ------------------------------------------------------
device:epic-mouse-v1 {
   # sensitivity = -0.5
}


#--- ПРАВИЛА ОКОН -------------------------------------------------------------
#windowrule = float,^(org.telegram.desktop)$
windowrule = float,^(imv)$
windowrule = float,^(mpv)$




 ## Pavucontrol
windowrule = float,^(pavucontrol)$
windowrule = size 650 400,^(pavucontrol)$,
windowrule = move 1200 50,^(pavucontrol)$
# Terminal

windowrule =  float,^(Alacritty)
#windowrule =  center,^(Alacritty)
windowrule = size 764 451,^(Alacritty)
windowrule = move 401,361,^(Alacritty)
## WorkSpaces
windowrule = workspace 1, firefox
windowrule = workspace 1, org.telegram.desktop
windowrule = workspace 2, nautilus
windowrule =  float, ^(obsidian) $,
windowrule = workspace 3, obsidian
windowrule = workspace 4,org.remmina.Remmina
windowrule = workspace 5, lutris
windowrule = workspace 6, spotify
## Firefox
windowrule = size 1600 900,^(Firefox)$
windowrule = float,^(Firefox)$
windowrule = center,^(Firefox)$
## Lutris
windowrule = size 1200 700,^(lutris)$
windowrule = float,^(lutris)$
windowrule = center,^(lutris)$




#--- КЛАВИША МОДИФИКАТОР ------------------------------------------------------
$mainMod = SUPER

#--- ЗАПУСК ПРИЛОЖЕНИЙ --------------------------------------------------------
bind = $mainMod, RETURN, exec, $terminal
bind = $mainMod, N, exec, $fileManager
#bind = $mainMod, D, exec, wofi --show drun --allow-images -c ~/.config/wofi/config  ~/.config/wofi/style.css
bind = $mainMod, D, exec, wofi --show drun --allow-images -c ~/.config/wofi/config -s  ~/.config/wofi/style.bak.css
#bind = $mainMod, D, exec,  /home/darkside/.config/rofi/launchers/type-6/launcher.sh

bind = $mainMod, i, exec, inkscape
bind = $mainMod, o, exec, flatpak run md.obsidian.Obsidian
#bind = $mainMod, l, exec, swaylock -i ~/.wallpapers/Anime-Girl-2.png --effect-blur 5x5
bind = $mainMod, l, exec, hyprlock
bind = $mainMod, b, exec, blender
bind = , Print, exec, grim ~/screen-"$(date +%s)".png
bind = $mainMod, Print, exec, grim -g "$(slurp)" ~/screen-"$(date +%s)".png
#bind = $mainMod SHIFT, M, exec, killall waybar && waybar -c .config/waybar/config.jsonc -s .config/waybar/style.css

bind = $mainMod SHIFT, M, exec, killall waybar && waybar -c .config/waybar/config.jsonc -s .config/waybar/test.css

#--- Настройка кнопок звука --------------------------------
bind = $mainMod, F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
#bind = $mainMod, F3, exec, amixer -q set Master 5%+ unmute
#bind = $mainMod, F2, exec, amixer -q set Master 5%- unmute
bind = $mainMod, F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = $mainMod, F4, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle 
#pactl set-source-mute @DEFAULT_SOURCE@ toggle

#--- Настройка кнопок Яркости --------------------------------

bind = $mainMod, F6, exec, light -U 5
bind = $mainMod, F7, exec, light -A 5
#--- ХОТКЕИ -------------------------------------------------------------------
bind = $mainMod, C, killactive, 
bind = $mainMod, M, exit, 
bind = $mainMod, S, togglefloating, 
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

#--- ПЕРЕМЕЩЕНИЕ ПЛАВАЮЩИИХ ОКОН ----------------------------------------------
bind = $mainMod ALT, right, moveactive, 50 0
bind = $mainMod ALT, left, moveactive, -50 0
bind = $mainMod ALT, up, moveactive, 0 -50
bind = $mainMod ALT, down, moveactive, 0 50

#--- ПЕРЕКЛЮЧЕНИЕ ФОКУСА ------------------------------------------------------
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

#--- ПЕРЕКЛЮЧЕНИЕ ВОРКСПЕЙСОВ -------------------------------------------------
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Настройка Воркспейсов на двух мониторов #
workspace=1,monitor:eDP-1
workspace=2,monitor:eDP-1
workspace=3,monitor:eDP-1
workspace=4,monitor:eDP-1
workspace=5,monitor:eDP-1


workspace=6,monitor:DP-3
workspace=7,monitor:DP-3
workspace=8,monitor:DP-3
workspace=9,monitor:DP-3
workspace=10,monitor:DP-3


workspace=6,monitor:DP-4
workspace=7,monitor:DP-4
workspace=8,monitor:DP-4
workspace=9,monitor:DP-4
workspace=10,monitor:DP-4


#--- ПЕРЕМЕЩЕНИЕ ОКОН НА ДРУГОЙ ВОРКСПЕЙС -------------------------------------
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

#--- СКРАЧПАД -----------------------------------------------------------------
#bind = $mainMod, S, togglespecialworkspace, magic
#bind = $mainMod SHIFT, S, movetoworkspace, special:magic

#--- ПЕРЕХОД ПО ВОРКСПЕЙСАМ КОЛЕСОМ МЫШИ --------------------------------------
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

#--- ПЕРЕМЕЩЕНИЕ И РЕСАЙЗ ОКОН МЫШЬЮ ------------------------------------------
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

#--- РЕСАЙЗ -------------------------------------------------------------------
bind = $mainMod CTRL, left, resizeactive,-50 0
bind = $mainMod CTRL, right, resizeactive,50 0
bind = $mainMod CTRL, up, resizeactive,0 -50
bind = $mainMod CTRL, down, resizeactive,0 50
